package com.cloudbroker.bcs.csvc.uc.facade.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cloudbroker.bcs.common.entity.HSBCPSBackVO;
import com.cloudbroker.bcs.csvc.uc.api.constants.UCT2FunctionIds;
import com.cloudbroker.bcs.csvc.uc.api.service.UCService;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncAdviserForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncAuthCodeForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncCodeCheckForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncLoginForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncPasswordResetForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncRegisterAndLoginForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncRegisterForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.FuncUserUpdateForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.base.UCForm;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.AdviserInfoVo;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.AuthCodeBackVo;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.CheckRegisterBackVo;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.CustomerAccountType;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.UIDBackVo;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.UserInfoBackVo;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.base.UCBackVo;

@Service
public class UCServiceFacade implements UCService {
    
    @Resource
    private T2RemoteService service;
    
    @Override
    public UIDBackVo funcRegister(FuncRegisterForm param) {
        return service.callT2(UCT2FunctionIds.UC_REGISTER, param, UIDBackVo.class);
    }
    
    @Override
    public UIDBackVo funcLogin(FuncLoginForm param) {
        return service.callT2(UCT2FunctionIds.UC_LOGIN, param, UIDBackVo.class);
    }
    
    @Override
    public AuthCodeBackVo funcAuthCodeGet(FuncAuthCodeForm param) {
        return service.callT2(UCT2FunctionIds.UC_AUTH_CODE_GET, param, AuthCodeBackVo.class);
    }
    
    @Override
    public UCBackVo funcAuthCodeLogin(FuncCodeCheckForm param) {
        return service.callT2(UCT2FunctionIds.UC_AUTH_CODE_LOGIN, param, UCBackVo.class);
    }
    
    @Override
    public HSBCPSBackVO funcUserUpdate(FuncUserUpdateForm param) {
        return service.callT2(UCT2FunctionIds.UC_USER_UPDATE, param, HSBCPSBackVO.class);
    }
    
    @Override
    public UserInfoBackVo funcUserinfo(UCForm param) {
        return service.callT2(UCT2FunctionIds.UC_USERINFO, param, UserInfoBackVo.class);
    }
    
    @Override
    public UserInfoBackVo funcUserTokenCheck(UCForm param) {
        return service.callT2(UCT2FunctionIds.UC_USER_TOKEN_CHECK, param, UserInfoBackVo.class);
    }
    
    @Override
    public HSBCPSBackVO funcLogout(UCForm param) {
        return service.callT2(UCT2FunctionIds.UC_LOGOUT, param, UserInfoBackVo.class);
    }
    
    @Override
    public HSBCPSBackVO funcPasswordReset(FuncPasswordResetForm param) {
        return service.callT2(UCT2FunctionIds.UC_PASSWORD_RESET, param, UserInfoBackVo.class);
    }

    @Override
    public UIDBackVo funcRegisterAndLogin(FuncRegisterAndLoginForm param) {
        return service.callT2(UCT2FunctionIds.UC_REGISTER_AND_LOGIN, param, UIDBackVo.class);
    }

    @Override
    public UserInfoBackVo funcUserBasicInfo(FuncLoginForm param) {
        return service.callT2(UCT2FunctionIds.UC_USER_BASIC_INFO, param, UserInfoBackVo.class);
    }

    @Override
    public CheckRegisterBackVo funcCheckRegister(FuncLoginForm param) {
        return service.callT2(UCT2FunctionIds.UC_CHECK_REGISTER, param, CheckRegisterBackVo.class);
    }

    @Override
    public AdviserInfoVo funcAdviserGet(FuncAdviserForm param) {
        return service.callT2(UCT2FunctionIds.UC_ADVISER_INFO, param, AdviserInfoVo.class);
    }

    @Override
    public CustomerAccountType funcIsCapitalAccount(UCForm param) {
        return service.callT2(UCT2FunctionIds.UC_USERINFO, param, CustomerAccountType.class);
    }
}
